package com.maiji.cloud.mapper;

import com.maiji.cloud.entities.community.ComUserRelation;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.maiji.cloud.entities.login.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2019-07-02
 */
@Mapper
public interface ComUserRelationMapper extends BaseMapper<ComUserRelation> {

    public List<ComUserRelation> findAll();

    public ComUserRelation findOneByFId(@Param("followerId") String followerId,@Param("focuserId")String focuserId);

    /**
     * 根据粉丝id获取所有关注人ID
     * @param followerId 粉丝ID
     * @return
     */
    public List<ComUserRelation> findAllByFId(@Param("followerId") String followerId);


    public List<UserInfo> findAllUserInfoByFId(@Param("followerId") String followerId);



}
